﻿<Window x:Class="PICOC.WPF.View.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        xmlns:local="clr-namespace:PICOC.WPF.View"
        Title="Draft PICOC" Height="600" Width="800" Loaded="Window_Loaded"
        >
    <Grid Margin="10" Background="White">
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="30" />
            <RowDefinition />
            <RowDefinition />
        </Grid.RowDefinitions>

        <TextBlock Text="What is your Research Question?" Grid.Row="0" Margin="10" FontSize="24"/>

        <Viewbox Grid.Row="1">
            <RichTextBox x:Name="tbQuestion" FontSize="18" Width="200" TextChanged="tbQuestion_TextChanged" />
        </Viewbox>

        <TextBlock Text="Synonyms" Grid.Row="2" HorizontalAlignment="Right" Margin="250,0"/>
        
        <Grid Grid.Row="3">
            <Grid.RowDefinitions>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
                <RowDefinition/>
            </Grid.RowDefinitions>
            <Grid.ColumnDefinitions>
                <ColumnDefinition Width="100"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="30"/>
                <ColumnDefinition Width="30"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="150"/>
                <ColumnDefinition Width="150"/>
            </Grid.ColumnDefinitions>

            <TextBlock Text="Population" Grid.Column="0" Grid.Row="0"/>
            <TextBox x:Name="tbPopulation" Grid.Column="1" Grid.Row="0" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendPopulation" Fill="Orange" Grid.Column="2" Grid.Row="0"/>-->
            <ComboBox x:Name="cbLegendPopulation" Grid.Column="2" Grid.Row="0" SelectedIndex="0" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Orange" Width="30" Height="30" />
                <Rectangle Fill="Yellow" Width="30" Height="30" />
                <Rectangle Fill="GreenYellow" Width="30" Height="30" />
                <Rectangle Fill="LightGreen" Width="30" Height="30" />
                <Rectangle Fill="Green" Width="30" Height="30" />
                <Rectangle Fill="LightBlue" Width="30" Height="30" />
                <Rectangle Fill="Blue" Width="30" Height="30" />
                <Rectangle Fill="Pink" Width="30" Height="30" />
                <Rectangle Fill="Red" Width="30" Height="30" />
            </ComboBox>
            <Border x:Name="warningPopulation" Grid.Column="3" Grid.Row="0" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbPopulationS1" Grid.Column="4" Grid.Row="0" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbPopulationS2" Grid.Column="5" Grid.Row="0" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbPopulationS3" Grid.Column="6" Grid.Row="0" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Intervention" Grid.Column="0" Grid.Row="1"/>
            <TextBox x:Name="tbIntervention" Grid.Column="1" Grid.Row="1" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendIntervention" Fill="LightBlue" Grid.Column="2" Grid.Row="1"/>-->
            <ComboBox x:Name="cbLegendIntervention" Grid.Column="2" Grid.Row="1" SelectedIndex="1" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Orange" Width="30" Height="30" />
                <Rectangle Fill="Yellow" Width="30" Height="30" />
                <Rectangle Fill="GreenYellow" Width="30" Height="30" />
                <Rectangle Fill="LightGreen" Width="30" Height="30" />
                <Rectangle Fill="Green" Width="30" Height="30" />
                <Rectangle Fill="LightBlue" Width="30" Height="30" />
                <Rectangle Fill="Blue" Width="30" Height="30" />
                <Rectangle Fill="Pink" Width="30" Height="30" />
                <Rectangle Fill="Red" Width="30" Height="30" />
            </ComboBox>
            <Border x:Name="warningIntervention" Grid.Column="3" Grid.Row="1" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbInterventionS1" Grid.Column="4" Grid.Row="1" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbInterventionS2" Grid.Column="5" Grid.Row="1" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbInterventionS3" Grid.Column="6" Grid.Row="1" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Comparison" Grid.Column="0" Grid.Row="2"/>
            <TextBox x:Name="tbComparison" Grid.Column="1" Grid.Row="2" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendComparison" Fill="Yellow" Grid.Column="2" Grid.Row="2"/>-->
            <ComboBox x:Name="cbLegendComparison" Grid.Column="2" Grid.Row="2" SelectedIndex="2" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Orange" Width="30" Height="30" />
                <Rectangle Fill="Yellow" Width="30" Height="30" />
                <Rectangle Fill="GreenYellow" Width="30" Height="30" />
                <Rectangle Fill="LightGreen" Width="30" Height="30" />
                <Rectangle Fill="Green" Width="30" Height="30" />
                <Rectangle Fill="LightBlue" Width="30" Height="30" />
                <Rectangle Fill="Blue" Width="30" Height="30" />
                <Rectangle Fill="Pink" Width="30" Height="30" />
                <Rectangle Fill="Red" Width="30" Height="30" />
            </ComboBox>
            <Border x:Name="warningComparison" Grid.Column="3" Grid.Row="2" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbComparisonS1" Grid.Column="4" Grid.Row="2" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbComparisonS2" Grid.Column="5" Grid.Row="2" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbComparisonS3" Grid.Column="6" Grid.Row="2" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Outcome" Grid.Column="0" Grid.Row="3"/>
            <TextBox x:Name="tbOutcome" Grid.Column="1" Grid.Row="3" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendOutcome" Fill="LightGreen" Grid.Column="2" Grid.Row="3"/>-->
            <ComboBox x:Name="cbLegendOutcome" Grid.Column="2" Grid.Row="3" SelectedIndex="5" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Orange" Width="30" Height="30" />
                <Rectangle Fill="Yellow" Width="30" Height="30" />
                <Rectangle Fill="GreenYellow" Width="30" Height="30" />
                <Rectangle Fill="LightGreen" Width="30" Height="30" />
                <Rectangle Fill="Green" Width="30" Height="30" />
                <Rectangle Fill="LightBlue" Width="30" Height="30" />
                <Rectangle Fill="Blue" Width="30" Height="30" />
                <Rectangle Fill="Pink" Width="30" Height="30" />
                <Rectangle Fill="Red" Width="30" Height="30" />
            </ComboBox>
            <Border x:Name="warningOutcome" Grid.Column="3" Grid.Row="3" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbOutcomeS1" Grid.Column="4" Grid.Row="3" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbOutcomeS2" Grid.Column="5" Grid.Row="3" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbOutcomeS3" Grid.Column="6" Grid.Row="3" TextChanged="tbSyn_TextChanged"/>

            <TextBlock Text="Context" Grid.Column="0" Grid.Row="4"/>
            <TextBox x:Name="tbContext" Grid.Column="1" Grid.Row="4" TextChanged="tbElement_TextChanged"/>
            <!--<Rectangle x:Name="legendContext" Fill="Pink" Grid.Column="2" Grid.Row="4"/>-->
            <ComboBox x:Name="cbLegendContext" Grid.Column="2" Grid.Row="4" SelectedIndex="7" SelectionChanged="cbLegenda_SelectionChanged">
                <Rectangle Fill="Orange" Width="30" Height="30" />
                <Rectangle Fill="Yellow" Width="30" Height="30" />
                <Rectangle Fill="GreenYellow" Width="30" Height="30" />
                <Rectangle Fill="LightGreen" Width="30" Height="30" />
                <Rectangle Fill="Green" Width="30" Height="30" />
                <Rectangle Fill="LightBlue" Width="30" Height="30" />
                <Rectangle Fill="Blue" Width="30" Height="30" />
                <Rectangle Fill="Pink" Width="30" Height="30" />
                <Rectangle Fill="Red" Width="30" Height="30" />
            </ComboBox>
            <Border x:Name="warningContext" Grid.Column="3" Grid.Row="4" Visibility="Collapsed" Background="Yellow" BorderBrush="Black" BorderThickness="3" CornerRadius="30,30,5,5" ToolTip="WARNING: It's not in your question.">
                <TextBlock Text="!" HorizontalAlignment="Center" VerticalAlignment="Center"/>
            </Border>
            <TextBox x:Name="tbContextS1" Grid.Column="4" Grid.Row="4" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbContextS2" Grid.Column="5" Grid.Row="4" TextChanged="tbSyn_TextChanged"/>
            <TextBox x:Name="tbContextS3" Grid.Column="6" Grid.Row="4" TextChanged="tbSyn_TextChanged"/>
        </Grid>
        
        <RichTextBox x:Name="tbQuery" Grid.Row="4" Margin="10" IsReadOnly="True" FontSize="18"/>
    </Grid>
</Window>

    